package com.hm;

import org.wxd.net.controller.ProtoBufCreateController;
import org.wxd.net.web.ws.WebSocketServer;
import org.wxd.system.JvmUtil;

public class Main {
    public static void main(String[] args) throws Exception {
        ProtoBufCreateController protoBufCreateController = new ProtoBufCreateController();

        protoBufCreateController.setProtoSourcePath("com.mmo.cq.message/src/protobuf/game");
        protoBufCreateController.setProtoOutPath(JvmUtil.userHome() + "/com.mmo.cq.game-server-script/src/main/java/");

        protoBufCreateController.buildProtobuf(
                "java",
                "com.mmo.cq.message/src/protobuf/win64/protoc.exe",
                "java_out"
        );

        protoBufCreateController.createMessageId("Req|Res");
        System.out.println();

        protoBufCreateController.createController(
                "Req",
                WebSocketServer.class.getName(),
                "com.mmo.cq.game.server.bean.user.UserInfo",
                "UserInfo"
        );

    }
}